package com.heima.controller;

import com.heima.common.result.PageResult;
import com.heima.pojo.dto.OrderQueryDTO;
import com.heima.pojo.entity.Order;
import com.heima.service.OrderService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * \* User: chy
 * \* Date: 2025/8/23  15:44
 * \* Description:订单管理
 * \
 */
@RestController
@RequestMapping("/api/order-service/order")
@Slf4j
public class OderController {

    @Autowired
    private OrderService orderService;

   /**
     * 订单列表
     * @param orderPageDTO
     * @return
     */
    @GetMapping("/search")
    public PageResult<Order> page(OrderQueryDTO orderPageDTO) {
        return orderService.pageResultOrder(orderPageDTO);
    }
}
